package com.example.demo2;

import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.InputType;
import android.view.Gravity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.Chronometer;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.ScrollView;
import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.Toast;

import java.util.LinkedList;
import java.util.List;

public class MainActivity extends AppCompatActivity {

//    private List<News> mData = null;
//    private Context mContext;
//    private NewAdapter mAdapter = null;
//    private ListView listView;

    @SuppressLint("SetTextI18n")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

//        TextView textHello = findViewById(R.id.tv_hello);//获取helloandroid 怎么给textview控件修改字体的属性
//        textHello.setText("Hello Android！");//修改Hello的值

//        EditText username = findViewById(R.id.username);//获取username
//        username.requestFocus();//设置打开应用自动获取光标
//        username.setSelection(0);//设置光标停留在第几个字符后面

            //写一个登录按钮按一下，显示登录中，就不能再按了。
        Button login = findViewById(R.id.login);
        login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
            Intent enterPage = new Intent(MainActivity.this,Detail_Activity2.class);
            startActivity(enterPage);
            }
        });
        TextView FindPassword = findViewById(R.id.find_password);
        FindPassword.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this, find_back_password_Activity.class));
            }
        });
        TextView register = findViewById(R.id.register);
        register.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(MainActivity.this,register_Activity.class));
            }
        });

//        EditText account =  findViewById(R.id.account);
//        account.setInputType(InputType.TYPE_CLASS_NUMBER|InputType.TYPE_DATETIME_VARIATION_NORMAL);
//
//
















    }
}




